$(document).ready(function(){
	f_menutype_config_display();
	$('#edit-menu-type').change(function(){
		f_menutype_config_display();
	});
});



function f_menutype_config_display(){
	var name = $('#edit-menu-type').val();
	
	var tmp_id = '';
	var sub_forms = $('fieldset[id|=flexmenu]');
	sub_forms.each(function (i, item){
		tmp_id = $(item).attr('id');
		if(tmp_id == 'flexmenu-' + name){
			$(item).show();
		}else{
			$(item).hide();
		}
	});
}

function f_menu_additional_type(id){
	var type = $('#' + id).val();
	$('#' + id).siblings('.node, .block, .view').hide();
	
	$('#'+id+'> option').each(function (){
		if(this.value == type){
			$('#' + id).siblings ('.' + this.value).show();
		}
	});
}
/*
var test_tm = setTimeout(function(){
	alert('da vao day');
}, 3000);

function clearTM(){
	console.log('before:' + test_tm);
	clearTimeout(test_tm);
	console.log('end:' + test_tm);
}
*/